package com.yswy.backstage.dto.req;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;

/**
 * @author 19401
 * @date 2022/6/8 22:18
 **/
@Data
public class PermissionOptionReqVO extends GroupsReqVO{
    @NotNull(message = "ID不能为空", groups = GroupsReqVO.UPDATE.class)
    private Integer id;
    @ApiModelProperty("父级")
    private Long pId;
    @ApiModelProperty("名称")
    private String name;
    @ApiModelProperty("权限名称")
    @NotEmpty(message = "名称 不能为空", groups = {GroupsReqVO.CREATE.class, GroupsReqVO.UPDATE.class})
    private String permissionName;
    @ApiModelProperty("权限类型（1:目录 2:菜单 3:按钮 4:接口）")
    @NotNull(message = "权限类型 不能为空", groups = {GroupsReqVO.CREATE.class, GroupsReqVO.UPDATE.class})
    private Integer permissionType;
    @ApiModelProperty("地址")
    @NotEmpty(message = "地址 不能为空", groups = {GroupsReqVO.CREATE.class, GroupsReqVO.UPDATE.class})
    private String path;
    @ApiModelProperty("组件路径")
    private String component;
    @ApiModelProperty("icon")
    private String icon;
    @ApiModelProperty("重定向地址")
    private String redirect;
    @ApiModelProperty("排序")
    private Integer orderBy;
    @ApiModelProperty("是否缓存（0缓存 1不缓存）")
    private Integer isCache;
    @ApiModelProperty("是否隐藏 1:隐藏 0:不隐藏")
    private Integer isHidden;
    @ApiModelProperty("外链")
    private String link;
}
